<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%
    request.setCharacterEncoding("UTF-8");
    response.setContentType("charset=UTF-8");
%>

<div id="form">
    <b>Wprowadź dane potrzebne do rejestracji.</b><br>
    <form:form method="post" commandName="user">
        <table>
            <tr><td class="label">Nazwa użytkownika:</td><td><form:input path="username"/></td><td class="error"><form:errors path="username"/></td></tr>
            <tr><td class="label">Hasło:</td><td><form:password path="password"/></td><td class="error"><form:errors path="password"/></td></tr>
            <tr><td class="label">E-mail:</td><td><form:input path="email"/></td><td class="error"><form:errors path="email"/></td></tr>
            <tr><td>&nbsp;</td><td></td><td></td></tr>
            <tr><td class="label">Imię:</td><td><form:input path="address.name"/></td><td class="error"><form:errors path="address.name"/></td></tr>
            <tr><td class="label">Nazwisko:</td><td><form:input path="address.surname"/></td><td class="error"><form:errors path="address.surname"/></td></tr>
            <tr><td class="label">Ulica:</td><td><form:input path="address.street"/></td><td class="error"><form:errors path="address.street"/></td></tr>
            <tr><td class="label">Numer ulicy:</td><td><form:input path="address.streetNumber"/></td><td class="error"><form:errors path="address.streetNumber"/></td></tr>
            <tr><td class="label">Miasto:</td><td><form:input path="address.town"/></td><td class="error"><form:errors path="address.town"/></td></tr>
            <tr><td class="label">Kod pocztowy:</td><td><form:input path="address.postal"/></td><td class="error"><form:errors path="address.postal"/></td></tr>
            <tr><td></td><td><input type="submit" value="Zarejestruj"/></td><td></td></tr>
        </table>

    </form:form>
</div>